import styles from './index.less';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import Loading from './loading/loading';
import Bug_1 from './看代码解决问题/Bug_1';
import Index from './封装多对象表单组件/Index';
import GetDerivedStateFromProps from './get生命周期/GetDerivedStateFromProps';
import UseReducer from './useReducer/UseReducer';
import Input from './搜索框组件/Input';
import AddList from './自增列表组件/AddList';
import CardList from './ai/CardList';
import A from './ahooks/a';
import Indexclass from './class_跨组件传值/index';
import Funindex from './fun_函数组件_父调子/Funindex';
import Card from './航_阿里面试题/Card';
import Echarts_index from './echarts_的使用/Echarts_index';
import FormIndex from './3_封装form表单/FormIndex';
// import SetWhiteList from './4_白名单/setWhiteList';
import MyRCFieldForm from './3_1封装form表单/MyRcFieldForm';
import Baoform from './3_2封装form表单/Baoform';
import Form_Table from './5_封装form和table页面/Form_Table';
import Take_off from './6_拖拽事件/Take_off';
import Mock_index from './7_mock数据/Mock_index';
import Dva from './8_Dva的使用/Dva';
import Debounce from './9_input中的防抖/debounce';
export default function IndexPage() {
  return (
    <div style={{ background: '#fff', height: '100vh' }}>
      <h1 className={styles.title}>入口文件</h1>
      <hr />
      {/* <Loading /> */}
      {/* <Bug_1 /> */}

      {/* 封装 组件的 */}
      {/* <Index /> */}

      {/* 验证生命周期的 */}
      {/* <GetDerivedStateFromProps /> */}

      {/* useReducer 的基本使用 */}
      {/* <UseReducer /> */}

      {/* 搜索框 组件 */}
      {/* <Input /> */}

      {/* 自增列表组件 */}
      {/* <AddList /> */}

      {/* 笔试题 */}
      {/* <CardList  list={cardDataList} /> */}

      {/* ahooks 不知道是干啥用的 */}
      {/* <A /> */}

      {/* 跨组件传值   使用 类组件 */}
      {/* <Indexclass /> */}

      {/* 函数 组件，父组件 调用 子组件的 方法  useImperativeHandle 的方式 调用的  */}
      {/* <Funindex /> */}

      {/* 阿里 航的 面试题 */}
      {/* <Card /> */}

      {/* Echarts 的使用 */}
      {/* <Echarts_index /> */}

      {/* 封装 form 表单 */}
      {/* <FormIndex /> */}

      {/* 白名单 */}
      {/* <SetWhiteList /> */}

      {/* 航哥 给的 博客 里面 实现的 form 表单 使用 rc-field-form 库实现 */}
      {/* <MyRCFieldForm /> */}

      {/* 航哥给的 博客，实现 form */}
      {/* <Baoform /> */}

      {/* 封装 基于 antd 封装 form 和 table 组件 */}
      {/* <ConfigProvider locale={zhCN}>
        <Form_Table />
      </ConfigProvider> */}

      {/* 拖拽事件 */}
      {/* <Take_off /> */}

      {/* mock 数据 */}
      {/* <Mock_index /> */}

      {/* Dva 的使用 */}
      {/* <Dva /> */}
      <Debounce />
    </div>
  );
}

const cardDataList = [
  {
    brandName: '弄堂里',
    brandLogo:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*anNdQqA_I_AAAAAAAAAAAAAAARQnAQ',
    distanceDesc: '500m',
    campImage:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*U29sSqgeU-4AAAAAAAAAAAAAARQnAQ',
    promoLogo: [
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*y6CTRo9L2oEAAAAAAAAAAAAAARQnAQ',
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*Q1d4SIoeKRkAAAAAAAAAAAAAARQnAQ',
    ],
    voucherDesc: '弄堂里14元超值优惠券包x2',
    benefitAmount: '1',
    oriPriceAmount: '28',
    discountDesc: '0.6折',
    voucherStockNum: '库存888份',
  },
  {
    brandName: '弄堂里',
    brandLogo:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*anNdQqA_I_AAAAAAAAAAAAAAARQnAQ',
    distanceDesc: '500m',
    campImage:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*U29sSqgeU-4AAAAAAAAAAAAAARQnAQ',
    promoLogo: [
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*Q1d4SIoeKRkAAAAAAAAAAAAAARQnAQ',
    ],
    voucherDesc: '弄堂里14元超值优惠券包x2',
    benefitAmount: '1',
    discountDesc: '0.6折',
  },
  {
    brandName: '飞猪',
    brandLogo:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*dCL5Q4oBaQsAAAAAAAAAAAAAARQnAQ',
    campImage:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*MZ7VSaNZXRYAAAAAAAAAAAAAARQnAQ',
    promoLogo:
      'https://gw.alipayobjects.com/mdn/rms_7527d7/afts/img/A*90WEQLmnKdkAAAAAAAAAAAAAARQnAQ',
    voucherDesc: '南方航空20元优惠券',
    benefitAmount: '20',
  },
];

// import GetDerivedStateFromProps from './get生命周期/GetDerivedStateFromProps';

// import React, { Component } from 'react'

// export default class index extends Component {
//   constructor(props) {
//     super(props)
//     this.state = {
//       count: 0
//     }
//   }
//   render() {
//     return (
//       <div>
//         <div> 父组件 {this.state.count} </div>
//         <button onClick={() => this.setState({count: ++this.state.count})} > 点击 count </button>
//         <hr />
//         <GetDerivedStateFromProps count={this.state.count} />
//       </div>
//     )
//   }
// }
